<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
</head>
<body>
    <div id="app">
        <ul>
            <li>
                <h2>{{title}}</h2>
                <input type="text" placeholder="请输入title" v-model="title"/>
                <button v-on:click="modifyTitle">修改title</button>
            </li>
            <li>
                <h2>{{name}}</h2>
                <input type="text" placeholder="请输入name" v-model="name"/>
                <button v-on:click="modifyName">修改name</button>
            </li>
        </ul>
    </div>
    <script src="./simple_vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                title: 'title1',
                name: 'name1'
            },
            methods:{
                modifyTitle(){
                    this.title = "这是修改过的title";
                },
                modifyName(){
                    this.name = "这是修改过的name";
                }
            }
        });
    </script>
</body>
</html>